/*
 * @Description: 支付方式模型
 * @Author: yingying.fan
 * @Date: 2019-03-25 15:59:30
 * @Last Modified by: yingying.fan
 * @Last Modified time: 2019-04-02 18:49:20
 */
export default class CardInfoModel {
  /**
   * 构造函数
   * @param {Object} data 数据对象
   */
  constructor(data = {}) {
    /**
     *
     * @param {String} payId 扣款顺序记录编号
     * @param {String} payName 支付方式名称
     * @param {String} bankCardShortNo 银行卡号后四位
     * @param {String} payment 支付方式:ACCOUNT_PAY:账户余额支付，BINDCARD_PAY：绑卡付
     * @param {String} payAccount 支付账户号
     * @param {Boolean} isSupport 是否支持
     */
    this.payId = data.PAYMENT_ORDER_ID
    this.payName = data.PAYMENT_NAME || '钱包余额'
    this.bankCardShortNo = data.BANK_CARD_SHORT_NO || ''
    this.payment = data.PAYMENT || ''
    this.isAccountPay = data.PAYMENT === 'ACCOUNT_PAY'
    this.payAccount = data.PAY_ACCOUNT
    this.isSupport = data.IS_SUPPORT !== 0
  }
}
